package com.project.controller;


import com.project.bean.SectorBean;
import com.project.service.ISectorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("/sector")
public class SectorController {
      @Autowired
      private ISectorService service;
      
      /**
       * 根据指定的时间段统计每个类别的销售额
       *
       * @param star 起始时间
       * @param end  结束时间
       * @return 统计对象集合
       */
      @RequestMapping("findByClasses")
      public List<SectorBean> findByClasses(LocalDate star, LocalDate end) {
            return service.findByClasses(star, end);
      }
      
}
